﻿using System;
using UnityEngine;

namespace UniRx.Triggers
{
	// Token: 0x02000433 RID: 1075
	[DisallowMultipleComponent]
	public class ObservableFixedUpdateTrigger : ObservableTriggerBase
	{
		// Token: 0x06001691 RID: 5777 RVA: 0x00061EE3 File Offset: 0x000602E3
		private void FixedUpdate()
		{
			if (this.fixedUpdate != null)
			{
				this.fixedUpdate.OnNext(Unit.Default);
			}
		}

		// Token: 0x06001692 RID: 5778 RVA: 0x00061F00 File Offset: 0x00060300
		public IObservable<Unit> FixedUpdateAsObservable()
		{
			Subject<Unit> result;
			if ((result = this.fixedUpdate) == null)
			{
				result = (this.fixedUpdate = new Subject<Unit>());
			}
			return result;
		}

		// Token: 0x06001693 RID: 5779 RVA: 0x00061F28 File Offset: 0x00060328
		protected override void RaiseOnCompletedOnDestroy()
		{
			if (this.fixedUpdate != null)
			{
				this.fixedUpdate.OnCompleted();
			}
		}

		// Token: 0x04000CAD RID: 3245
		private Subject<Unit> fixedUpdate;
	}
}
